<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>

    </title>
</head>
<body>
    <button id="bd">百度</button><br>
    <a href="https://www.baidu.com">百度</a><br>
    <a href="05.html">05.html</a>
    <button id="go">前进</button>
</body>
<script>
    //全局变量都是window变量属性
    //全局函数都是window对象方法
    //访问window对象的属性或者调用window对象的方法是 可以省略window.

     window.document.querySelector("#bd")
                .addEventListener('click',function(){
                    //为location href属性数值 可以使页面跳转
                   window.location.href="https://www.baidu.com"
                   //刷新页面
                   location.reload();
                })
    window.document.querySelector("#go")   
                    .addEventListener('click',function(){
                        history.forward()
                    })
</script>
</html>